package com.xhwl.data.config.mybatisplus;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @Author: luyi
 * @Description: mybatis-plus 默认分页配置
 * @Date: Create in 18:03 2020/5/20
 */
@Component
public class PageInterceptorConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        //设置分页大小
        paginationInterceptor.setLimit(10000);
        return paginationInterceptor;
    }
}
